package jmc.util;

import java.sql.Timestamp;

import com.ibm.as400.access.AS400;


import jmc.core.service.impl.PdiManagerImpl;

public class ThreadPd0008PGM extends Thread{

	private AS400 as400 = null;
	private String reportNumber = "";
	private String clientNumber = "";
	
	/**
	 * @param args
	 */
	public ThreadPd0008PGM(AS400 as400, String reportNumber, String clientNumber){
		this.as400 = as400;
		this.reportNumber = reportNumber;
		this.clientNumber = clientNumber;
	}

	public void run(){
		PdiManagerImpl pdiManagerImpl = new PdiManagerImpl();
		System.out.println("Empece el PD00008 " + new Timestamp(System.currentTimeMillis()));
		pdiManagerImpl.callPRGPD00008(as400, reportNumber, clientNumber);
		if (this.as400 != null){
			as400.disconnectAllServices();
		}
		System.out.println("Termine el PD00008 " + new Timestamp(System.currentTimeMillis()));
	} 

	

}
